<xsl:template name="directory">
  <xsl:variable name="crmUrl">http://crm.safira.pt:5555</xsl:variable>
  <xsl:variable name="crmUrlConts"><xsl:value-of select="$crmUrl" />/sfa/conts/edit.aspx?</xsl:variable>
  <xsl:variable name="crmUrlAccts"><xsl:value-of select="$crmUrl" />/sfa/accts/edit.aspx?</xsl:variable>

  <strong>
    CRM Contact Results for <xsl:value-of select="title/urlText"/>:
  </strong>
   <xsl:for-each select="MODULE_RESULT/Field[@name='data']/Results/row">
     <tr>
       <td>
         <strong>
           <a>
             <xsl:attribute name="href"><xsl:value-of select="$crmUrlConts"/>id={<xsl:value-of select="@ContactId"/>}</xsl:attribute>
             <xsl:value-of select="@FullName" />
           </a>
         </strong> -
         <a>
           <xsl:attribute name="href"><xsl:value-of select="$crmUrlAccts"/>id={<xsl:value-of select="@AccountId"/>}</xsl:attribute>
           <xsl:value-of select="@Name"/>
         </a>
       </td>
     </tr>
  </xsl:for-each>
</xsl:template>
